home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tel2305b.zip / KEYMAP.TXT < prev    next >
Text File  |  1990-08-27  |  12KB  |  242 lines

  1. Introduction & Disclaimer: I stole this chunk of description from the 
  2.     MS-Kermit documentation without Cristine Gianone or Joe Doupnik's
  3.     permission after trying to get a hold of them through e-mail.  If
  4.     either of them really protest I will re-write it.  I do note their
  5.     copyright notice here however:
  6.  
  7.                             Copyright (C) 1981,1988
  8.             Trustees of Columbia University in the City of New York
  9.  
  10.      Permission is granted to any individual or institution to use, copy,
  11.     or redistribute this document so long as it is not sold for profit, and
  12.                   provided this copyright notice is retained.
  13.  
  14.     NCSA Telnet contains a subset of the kermit verbs listed here.
  15.     Kermit verbs with a star are supported and the others will cause an
  16.     error if they are in a keyboard mapping file.  I have also included
  17.     a utility from the MS-Kermit 2.32 distribution which will determine
  18.     what the actual kermit key code is for any combination of keys.  Use
  19.     this in the keyboard mapping file as the code to map from.  See the
  20.     telnet.key file included with this release for an example keyboard
  21.     mapping file.
  22.  
  23.     NCSA Telnet does not support the extended SET KEY options such as:
  24.         SET KEY ON
  25.         SET KEY OFF
  26.             or
  27.         SET KEY CLEAR
  28.  
  29.     Also, it is impossible to map the ALT+alphabetical keys to anything
  30.     with the keyboard mapping interface.  NCSA Telnet traps these internally
  31.     before they actually reach the mapping interface.
  32.  
  33. SET KEY
  34.  
  35. Syntax: SET KEY key-specifier [key-definition]
  36.   Also: SET KEY {ON, OFF, CLEAR}
  37.  
  38.     WARNING: The format and functions of this command have changed substan-
  39.     tially since version 2.29B and earlier.  The changes were made in order
  40.     to allow key redefinition to work on a wider  variety  of  systems  and
  41.     keyboards  without  customization  of  the program source code for each
  42.     configuration.  See section 1.12 for further details.
  43.  
  44. Typical uses of SET KEY:
  45.  
  46.    - You're used to having the ESC key in the upper  left  corner  of  the
  47.      keyboard,  but  your new PC keyboard has an accent grave ("`") there.
  48.      You can use SET KEY to make the accent key transmit an ESC,  and  you
  49.      can assign accent grave to some other key.
  50.  
  51.    - You  send  a lot of electronic mail, and always sign it the same way.
  52.      You can put your "signature" on a single key to save yourself  a  lot
  53.      of repetitive typing.
  54.  
  55.    - You  must  set  up  your PC's function keys or numeric keypad to work
  56.      properly with a host application.
  57.  
  58.    - You have trouble with Kermit's  2-character  escape  sequences  (like
  59.      Ctrl-]  C),  and  you  want to assign these functions to single keys,
  60.      like F10.
  61.  
  62. The SET KEY command does these things and more, and SHOW KEY  gives  us  assis-
  63. tance.  A key can be defined to:
  64.  
  65.    - send a single character other than what it would normally send,
  66.    - send a string of multiple characters,
  67.    - invoke a CONNECT-mode Kermit action verb,
  68.    - send itself again.
  69.  
  70. SET KEY specifies that when the designated key is struck during terminal emula-
  71. tion, the specified character or string is sent or the specified Kermit  action
  72. verb  is  performed.    Key  definitions  operate  only  during CONNECT, not at
  73. Kermit-MS> or DOS command level.
  74.  
  75. The key-specifier is the identification of the key expressed in  system-depend-
  76. ent  terms.   This can be a letter, such as Q for the key which produces an up-
  77. percase Q, or the numeric ASCII value of the letter in backslash notation (e.g.
  78. "\81"),  or  else the numerical "scan code" observed by the system when the key
  79. is pressed (e.g. "\3856" for Ctrl-Alt-Shift-Q on an IBM PC).  Material  printed
  80. on  keycaps  is  not  necessarily  a guide to what the key-specifier should be.
  81. When the word CLEAR is used in place of a key-specifier,  all  key  definitions
  82. are cleared and then any built-in definitions are restored.
  83.  
  84. A string definition is one or more characters, including 8-bit values expressed
  85. in backslash form, such as
  86.  
  87.     SET KEY \315 directory\13     IBM F1 key sends "directory<cr>"
  88.     SET KEY S X                   S key sends upper case X (a mean trick)
  89.     SET KEY T \27[m               T key sends three bytes: ESC [ m
  90.     SET KEY \2336 {del }xxx       Alt-D sends "del "
  91.     SET KEY \324 \Kexit           F10 escapes back to Kermit-MS> prompt.
  92.  
  93. The string begins with the first non-spacing character following the key  iden-
  94. tification  and  continues  until  the  end  of line, exclusive of any trailing
  95. spaces.  If a semicolon comment is used and the definition is given in  a  TAKE
  96. file,  the  line  ends  at the last non-spacing character before the semicolon.
  97. Curly braces, {...}, can be use to delimit the string  in  case  you  want  the
  98. definition  to  include trailing spaces.  All text after the closing bracket is
  99. ignored.
  100.  
  101. This manual does not contain a list of all the scan codes for all the  keys  on
  102. all  the  keyboards  on  all  the PCs supported by MS-Kermit -- that would be a
  103. manual in itself.  Rather, in order to obtain the key-specifier for the SET KEY
  104. command, you must type a SHOW KEY command and then press the desired key or key
  105. combination.  This will report a  scan  code  that  you  can  use  as  the  key
  106. specifier  in  a  SET  KEY  command.    To do this for many keys is a laborious
  107. process, so you should collect all your SET KEY commands into a file, which you
  108. can TAKE, or put them in your MSKERMIT.INI file.
  109.  
  110. If  you enter SET KEY by itself, with no key specifier, the command will prompt
  111. you to press the selected key and again for the  definition  string.    Certain
  112. characters,  like ESC and CR, may not be entered literally into the string, but
  113. can be included by inserting escape codes of the form \nnn,  a  backslash  fol-
  114. lowed by a 1- to 4-digit number corresponding to the ASCII value of the desired
  115. character.  Where an ASCII digit follows directly  after  a  backslash  number,
  116. confusion can be avoided by placing curly braces {} around the backslashed num-
  117. ber; thus, \{27}5 represents the two ASCII characters ESC and 5.
  118.  
  119. Here is an example of the use of SET KEY to assign ESC (ASCII 27) to the accent
  120. grave key.  First the user gets the key-specifier for the key:
  121.  
  122.     Kermit-MS>show key
  123.       Push key to be shown (? shows all): `
  124.       ASCII char: ` \96 decimal is defined as
  125.       Self, no translation.
  126.     Free space: 129 key and 100 string definitions, 837 string characters.
  127.  
  128. The  free  space report says that 129 more keys may be redefined, and up to 100
  129. of them may have multi-character strings assigned to them (as opposed to single
  130. characters),  and  that  there  are 837 bytes left for these strings, in total.
  131. Confident that there is enough space left for a new key  definition,  the  user
  132. proceeds:
  133.  
  134.     Kermit-MS>set key
  135.       Push key to be defined: `
  136.       Enter new definition: \27
  137.  
  138. Once  a key definition is constructed and tested, it may be entered on a single
  139. line in a command file (such as MSKERMIT.INI):
  140.  
  141.     set key \96 \27
  142.  
  143. To prevent accidents, SET KEY shows the current definition before asking for  a
  144. new one; enter a Control-C to keep the current definition, or a carriage return
  145. to undefine the key, or a query mark (?) to see available choices.
  146.  
  147. The keyboard can be restored to its startup state, that  is  all  redefinitions
  148. removed  and  all  built-in  defitions  restored, by using the keyword CLEAR in
  149. place of the key identification:
  150.  
  151.     SET KEY CLEAR
  152.  
  153. Undefined keys which do not send ASCII characters are trapped by  the  keyboard
  154. translator  and  are rejected; a beep results from using an undefined non-ASCII
  155. key.
  156.  
  157. SET KEY OFF directs MS-Kermit to read keycodes from DOS, rather than  BIOS,  so
  158. that  console  drivers  like ANSI.SYS that operate at the DOS level may be used
  159. during Kermit CONNECT sessions.  This would also apply to any special  keyboard
  160. replacements that come with DOS-level drivers.  SET KEY ON turns key definition
  161. back on, and returns Kermit to processing keystrokes at the BIOS level.
  162.  
  163.  
  164. Kermit Action Verbs
  165.  
  166. An action verb is the shorthand expression for a named Kermit  procedure,  such
  167. as  "generate  the  proper  sequence  for a left arrow," "show status," "send a
  168. BREAK," and others; verbs are complex actions and each verb has a name.   In  a
  169. key  definition  the  verb name is preceeded by backslash K (\K) to avoid being
  170. confused with a string.  Verbs and strings cannot be used together on a key.
  171.  
  172.     SET KEY \331 \Klfarr
  173.     SET KEY \2349 \Kexit
  174.  
  175. makes the IBM keyboard left arrow key execute the verb named lfarr which  sends
  176. the  proper escape sequence for a VT102 left arrow key (which changes depending
  177. on the internal state of the VT102).  The leading \K identifies the  definition
  178. as a Kermit verb, so no string can start as \K or as \{K in upper or lower case
  179. (use \92K).  The second example has Alt-X invoking the Leave-Connect-Mode  verb
  180. "exit" (same as Kermit escape character "^]" followed by C).
  181.  
  182. Each  system  has  its  own list of verbs and predefined keys.  Table 1-6 shows
  183. those available for the IBM PC family (there are also some additional verbs for
  184. reassigning  Heath  or  VT100  function keys, see section 1.17.2).  The SET KEY
  185. command shows the list of available verbs when a query mark (?) is given  as  a
  186. definition.    SHOW  KEY  displays  all  currently defined keys or individually
  187. selected ones; SHOW KEY can be executed only interactively.
  188.  
  189. -------------------------------------------------------------------------------
  190.  
  191.  
  192.   Verb           Meaning
  193.   \Kupscn        Roll up (back) to previous screen
  194.   \Kdnscn        Roll down (forward) to next screen
  195.   \Khomscn       Roll up to top of screen memory
  196.   \Kendscn       Roll down to end of screen memory (current position)
  197.   \Kupone        Roll screen up one line
  198.   \Kdnone        Roll screen down one line
  199.   \Kprtscn       Print the current screen
  200.   \Kdump         Append the current screen to dump file
  201.   \Kholdscrn     Toggle hold screen mode
  202.   \Klogoff       Turn off session logging
  203.   \Klogon        Turn on session logging
  204.   \Ktermtype     Toggle terminal type
  205.   \Kreset        Reset terminal emulator to initial state
  206.   \Kmodeline     Toggle modeline off/on
  207.   \Kbreak        Send a BREAK signal
  208.   \Klbreak       Send a "long BREAK" signal
  209.   \Khangup       Drop DTR so modem will hang up phone
  210. * \Knull         Send a null (ASCII 0)
  211.   \Kdos          "Push" to DOS
  212.   \Khelp         Display CONNECT help message
  213.   \Kstatus       Display STATUS message
  214.   \Kterminals    Invoke user-defined macro TERMINALS, if any
  215.   \Kterminalr    Invoke user-defined macro TERMINALR, if any
  216.   \Kexit         Escape back from CONNECT mode
  217. * \Kgold,\Kpf1   VT102 keypad function key PF1
  218. * \Kpf2..\Kpf4   VT102 keypad function keys
  219. * \Kkp0..\Kkp9   VT102 keypad numeric keys
  220. * \Kkpdot,\Kkpminus,\Kkpcoma,\Kkpenter   Other VT102 keypad keys
  221. * \Kuparr,\Kdnarr,\Klfarr,\Krtarr   VT102 cursor (arrow) keys
  222.  
  223.                Table 1-6:  Kermit-MS Verbs for the IBM PC Family
  224.  
  225. * - supported in NCSA Telnet 2.3b10
  226.  
  227. -------------------------------------------------------------------------------
  228.  
  229. Some systems have preset key definitions when Kermit first  begins  (those  for
  230. the  IBM  PC  are  shown in section 1.17.2).  You can find out what they are on
  231. your system by typing SHOW KEY, and then question mark on the next line.    You
  232. may supplement or change the predefined keys with SET KEY commands typed inter-
  233. actively or in MSKERMIT.INI or other command files.
  234.  
  235. The MS-Kermit CONNECT command may be used in conjunction with  certain  console
  236. drivers  that  do  their  own  key  redefinitions.   Since MS-Kermit intercepts
  237. keystrokes at the BIOS level, drivers like ANSI.SYS which work at the DOS level
  238. will  have no effect during CONNECT, even though they work at MS-Kermit command
  239. level.  Other drivers, like SuperKey and ProKey, work at the  BIOS  level,  and
  240. their  key  assignments  will remain effective during Kermit terminal sessions,
  241. and additional Kermit SET KEY assignments may be made "on top" of them.
  242.